<template>
  <!-- 异常设备监控 -->
  <div class="box abnormal-equipment">
    <div class="header">
      <div class="title">异常设备监控</div>
      <span class="el-icon-more more" />
    </div>
    <div v-if="statusTopList.length===0" class="empty">
      <img src="http://likede2-admin.itheima.net/img/empty.87c4f71b.png" alt="">
      <div class="tips">暂无数据</div>
    </div>
    <div v-else>
      <el-row v-for="(item,index) in statusTopList" :key="index" style="width: 100%;">
        <el-col :span="6">
          <div>{{ item.innerCode }}</div>
        </el-col>
        <el-col :span="12">
          <div>{{ item.address }}</div>
        </el-col>
        <el-col :span="6">
          <div>{{ item.time }}</div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import { getStatusTopAPI } from '@/api/workbench'
export default {
  name: '',
  components: {},
  props: {},
  data() {
    return {
      statusTopList: []
    }
  },
  computed: {},
  watch: {},
  created() {
    this.statusTop()
  },
  methods: {
    async statusTop() {
      const { data } = await getStatusTopAPI()
      this.statusTopList = data
    }
  }
}
</script>
<style scoped lang='scss'>
@import "~@/styles/home.scss";
</style>
